<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" lang="en-es" class="no-js">          
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<!--<![endif]-->
<head>
<title><g:layoutTitle default="Consultorio Online" /></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="google-site-verification" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Canonical -->
<link rel="canonical" href="http://www.domain.com" />
<!-- Icons &amp; Splash -->
<link rel="shortcut icon" href="${resource(dir:'img',file:'favicon.png') }">
<link rel="apple-touch-icon" href="${resource(dir:'img',file:'apple-touch-icon.png') }">
<link rel="icon" href="${resource(dir:'',file:'favicon.ico') }" sizes="16x16"/>
<link rel="icon" href="${resource(dir:'img',file:'icon-32.png') }" sizes="32x32"/>
<link rel="icon" href="${resource(dir:'img',file:'icon-48.png') }" sizes="48x48"/>
<link rel="icon" href="${resource(dir:'img',file:'icon-96.png') }" sizes="96x96"/>
<link rel="apple-touch-icon" href="${resource(dir:'img',file:'apple-touch-icon-57.png') }" />
<link rel="apple-touch-icon" sizes="72x72" href="${resource(dir:'img',file:'apple-touch-icon-72.png') }" />
<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir:'img',file:'apple-touch-icon-114.png') }" />
<link rel="apple-touch-startup-image" href="${resource(dir:'img',file:'ios-splash-1024x748.png') }" />
<!-- Icons &amp; Splash Ends -->
<link rel="stylesheet" href="${resource(dir:'css',file:'style.css')}">
<link rel="stylesheet" href="${resource(dir:'css',file:'master.css') }">
<link rel="stylesheet" href="${resource(dir:'css',file:'gradients.css') }">
<link rel="stylesheet" href="${resource(dir:'css',file:'jquery-ui-1.8.14.custom.css')}">
<link rel="stylesheet" href="${resource(dir:'css/tablesorter',file:'tablesorter.css')}">
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
<!-- Scripts-->
<%--<script src="${resource(dir:'js/libs',file:'jquery-1.5.1.js') }"></script>--%>
<g:javascript library="jquery" plugin="jquery"/>
<calendar:resources lang="es" theme="aqua"/>
<script src="${resource(dir:'js/libs',file:'modernizr-1.7.min.js') }"></script>
<script src="${resource(dir:'js/libs',file:'jquery-ui-1.8.14.custom.min.js') }"></script>
<script src="${resource(dir:'js/libs',file:'jquery.tablesorter.min.js') }"></script>
<!-- My Scripts-->
<script src="${resource(dir:'js/mylibs/cufon',file:'Cufon.js') }"></script> 
<script src="${resource(dir:'js/mylibs/cufon',file:'Cufon-Font.js') }"></script>
<script src="${resource(dir:'js/mylibs/cufon',file:'Cufon-Settings.js') }"></script>
<script src="${resource(dir:'js/mylibs/coda-slider-2.0',file:'jquery.easing.1.3.js') }"></script>
<script src="${resource(dir:'js/mylibs/coda-slider-2.0',file:'jquery.coda-slider-2.0.js') }"></script>
<script src="${resource(dir:'js/mylibs/nivo-slider',file:'jquery.nivo.slider.pack.js') }"></script>
<script src="${resource(dir:'js/mylibs/nivo-slider',file:'jquery.nivo.zoom.pack.js') }"></script>
<script src="${resource(dir:'js/mylibs',file:'swfobject.js') }"></script>
<script src="${resource(dir:'js/mylibs',file:'jquery.tipsy.js') }"></script>
<script src="${resource(dir:'js/mylibs',file:'jquery.placeholder.js') }"></script>
<script src="${resource(dir:'js/mylibs',file:'jquery.h5validate.js') }"></script>
<script src="${resource(dir:'js/mylibs',file:'jquery.prettyPhoto.js') }"></script>
<script src="${resource(dir:'js/mylibs',file:'twitter-1.13.1.min.js') }"></script>
<script src="${resource(dir:'js/mylibs/navigation',file:'dropdown.js') }"></script>

<!-- <script src="http://twitterjs.googlecode.com/svn/trunk/src/twitter.min.js"></script> -->
<!-- External Scripts-->
<script src="http://platform.twitter.com/widgets.js"></script>
<script src="https://apis.google.com/js/plusone.js">{lang: 'es-419'}</script>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<g:if test="${params.controller}">
<script>
		$(document).ready(function(){
			$('#searchFor${params.controller.capitalize()}').autocomplete({
				source:'${application.getContextPath()}/${params.controller}/autocomplete${params.controller.toLowerCase()}ajax',
				minLength: 1,
				select: function( event, ui ) {
					$.ajax({
						type : 'POST', 
						url: '${application.getContextPath()}/${params.controller}/search${params.controller.toLowerCase()}ajax',
						data : "id=" + ui.item.id,
						dataType: 'html',
						success: function(data){
<%--						$("#ajaxSearchResults").html(data);--%>
							$("#innerPageBody").html(data);
						}				
					});		
				}
			});
		});
	</script>
</g:if>

<!-- Open Graph Protocol Tags http://ogp.me/ -->
<meta property="og:url" content="DomainUrl" />
<meta property="og:title" content="DomainTitle" />
<meta property="og:type" content="FBType" />
<meta property="og:image" content="DomainLogoUrl" />
<meta property="fb:app_id" content="FBAppNumber" />
<meta property="fb:admins" content="FBAdminsNumber" />
<meta property="og:site_name" content="DomainTitle" />
<meta property="og:description" content="DomainDescription" />
</head>
<body>
<div id="container">
  <div id="fb-root"></div>
  <header>
    <div class="inner">
    	<a href="#" class="logo left"><img src="${resource(dir:'img',file:'logo.png') }" alt="google.com" width="72" heigth="72"></a>    	    
			<g:if test="${params.controller}">
				<g:if test="${(params.controller=='medico')||(params.controller=='paciente')||(params.controller=='admin')}">
					<div class='span-4 box rounded gradient-blue' style='height:40px;margin-left:75px;'>				
			    		<g:form>		    		
			    			<h6>B&uacute;squeda ${params.controller.capitalize()}:</h6>
			    			<g:field name='searchFor${params.controller.capitalize()}' id='searchFor${params.controller.capitalize()}' class='ui-autocomplete-input' autocomplete='yes' type="text" /> 		    				    			
			    		</g:form>      		
			    	</div>
		    	</g:if>
	    		
				<g:if test="${(params.controller=='medico' && !session.medicoLogged) || (params.controller=='paciente' && !session.pacienteLogged) || (params.controller=='admin' && !session.adminLogged)}">
					<ol id="user-log" class="right">
						<g:form class='cssform' action='loginrequest' controller='${params.controller}'>
							<label>DNI</label><li><g:field class="text_ h5-required" type="text" name='dni'/></li>
							<label>Password</label><li><g:passwordField class="text_ h5-required" name="password"/></li>
							<li><button class="donate">Ingresar</button></li>										
						</g:form>
		            </ol>
		        </g:if>
		        <g:elseif test="${(params.controller=='medico')||(params.controller=='paciente')||(params.controller=='admin')}">
			        <div class='box rounded right gradient-light shadow'>      	
			        	${render(template:"/templates/loggedinBoxTemplate",model:[implicitObj:session.getAttribute(params.controller.toLowerCase() + "Logged")]) }
			        </div>
		        </g:elseif>
            </g:if>            
    </div>
  </header>
	<nav id="navigation" class="clearfix"> 	 
			<ul class="menu left" id="menu">  
			  <g:include view='/menus/${params.controller}.gsp' ></g:include>
			</ul>
	</nav>
  <div id="main" role="main">
	  <g:if test="${flash.errorMessages}">
	  	<div class='error' id='flashMessages'>${flash.errorMessages}</div>
	  </g:if>
	  <g:if test="${flash.successMessages}">
	  	<div class='success' id='flashMessages'>${flash.successMessages}</div>
	  </g:if>
	  <g:if test="${flash.infoMessages}">
	  	<div class='info' id='flashMessages'>${flash.infoMessages}</div>
	  </g:if>
<%--	  <div name='ajaxSearchResults' id='ajaxSearchResults'></div>	  --%>
		<hr class='space'>
      <div id='innerPageBody'>
      	<g:layoutBody />
      </div>
  </div>
  <!-- eo #main -->
  <footer>
    <div class="inner">
      <nav>
        <ol>
          <li>&copy;2011 Domain.com</li>
          <li><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="domain">Tweet</a></li>
          <li><fb:like href="http://www.domain.com/" send="false" layout="button_count" show_faces="false" font="verdana"></fb:like></li>
          <li><a href="${application.getContextPath() }/about" title="About">About</a></li>
          <li><a href="${application.getContextPath() }/team" title="Team">Team</a></li>
          <li><a href="${application.getContextPath() }/jobs" title="Jobs">Jobs</a></li>
          <li><a href="${application.getContextPath() }/download" title="Download">Download</a></li>
          <li><a href="${application.getContextPath() }/faq" title="FAQ">FAQ</a></li>
          <li><a href="${application.getContextPath() }/terms" title="Terms">Terms</a></li>
          <li><a href="${application.getContextPath() }/privacy" title="Privacy">Privacy</a></li>
          <li><a href="http://blog.domain.com/" title="Blog">Blog</a></li>
          <li><a href="mailto:hello@domain.com" title="Contact Us">Contact</a></li>
        </ol>
      </nav>
    </div>
  </footer>
  <hr class="space"/>
</div>
<!-- eo #container --> 

<!-- scripts concatenated and minified via ant build script--> 
<script src="${resource(dir:'js',file:'plugins.js')}"></script> 
<script src="${resource(dir:'js',file:'script.js')}"></script>
<!--[if lt IE 7 ]>
    <script src="${resource(dir:'js/libs',file:'dd_belatedpng.js') }"></script>
    <script>DD_belatedPNG.fix("img, .png_bg");</script>
  <![endif]--> 
</body>
</html>